package com.service;

import com.dao.TArticleStatusDao;
import com.entity.TArticleStatus;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by del on 16-5-7.
 */
@Service
public class ArticleStatusService {

    @Autowired
    private TArticleStatusDao tArticleStatusDao;

    public Boolean add(TArticleStatus tArticleStatus){
        return tArticleStatusDao.insert(tArticleStatus);
    }

    public Boolean remove(Integer id){
        return tArticleStatusDao.delete(id);
    }

    public TArticleStatus modify(TArticleStatus tArticleStatus){
        return tArticleStatusDao.update(tArticleStatus);
    }

    public TArticleStatus getLatest(String aid){
        return tArticleStatusDao.select(aid);
    }
}
